package com.coolgame.login.dao;

import org.springframework.jdbc.core.JdbcTemplate;

import com.coolgame.login.bo.Account;
import com.coolgame.login.util.DBStaticVariables;

/**
 * 
 * @copyright : (C) Copyright jingjie Corporation 2011-2020
 * @date:2013-7-17
 * @author:Caiyw
 * @since JDK1.6
 * @description:TODO
 */
public class AccountDaoImpl implements AccountDaoInter {
	private JdbcTemplate jdbcTemplate;

	public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}

	@Override
	public Account loadAccount(String account) {
		Object[] param = new Object[] { account };
		return (Account) jdbcTemplate.queryForObject(DBStaticVariables.userQueryByAccountSql, param, Account.class);
	}

	@Override
	public void updateOnLogin(String account, String ip) {
		// TODO Auto-generated method stub

	}
}
